package com.myprocessing.gui.util;

import com.myprocessing.box.button.drag.DragCoord;

public class PolygonCoord extends Coord implements DragCoord {

	protected Polygon polygon;
	
	public boolean isValid(Coord coord) {
		return polygon.contains(coord.getX(), coord.getY());
	}

	public Polygon getPolygon() {
		return polygon;
	}

	public void setPolygon(Polygon polygon) {
		this.polygon = polygon;
	}
}
